FlatLabelAppearance

@Serializable
data class FlatLabelAppearance @JvmOverloads constructor(    val height: Float? = null,     val margin: Float? = 5.0f,     val color: String? = null,     val fontSize: Float? = 12.0f,     val scaleMin: Float? = 0.25f,     var scaleStep: Float? = 0.25f)

FlatLabelAppearance holds the appearance properties of flat labels to be set when labeling polygons

Constructors

Link copied to clipboard
constructor(    height: Float? = null,     margin: Float? = 5.0f,     color: String? = null,     fontSize: Float? = 12.0f,     scaleMin: Float? = 0.25f,     scaleStep: Float? = 0.25f)

Properties

Link copied to clipboard
val color: String? = null

Text Color of the flat label

Link copied to clipboard
val fontSize: Float? = 12.0f

How big to make the font. Defaults to 12 (default 12)

Link copied to clipboard
val height: Float? = null

By default this is the upper bounds of the Polygon. If you don't have a Polygon, or want a custom height for some reason, you can set this.

Link copied to clipboard
val margin: Float? = 5.0f

The amount of space to leave before starting the text (default 5)

Link copied to clipboard
val scaleMin: Float? = 0.25f

The minimum percentage we can shrink the label to if it won't fit within the bounds at 100%. If it doesn't fit at that level, it won't be created. (default 0.25)

Link copied to clipboard

How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If * you are only labeling a few Polygons rather than everything,you can set this and and scaleMin to 0.1 to fit everything except really long names perfectly.(default 0.25)